package com.ece.core.config;

import java.io.File;

/**
 * base class for all the types of parsers to be implemented.
 * 
 * @author Senthu Sivasambu, http://ca.linkedin.com/in/sivasambu
 * 
 */
public class AbstractConfigParser {

    /*
     * the schema source to be associated - note this is just the file name not
     * the path
     */
    private String parseSourceFileName;

    public AbstractConfigParser(String schemaSource) {
	this.parseSourceFileName = schemaSource;
    }

    /**
     * returns the file parse source
     * 
     * @return
     * @throws IllegalStateException
     *             if reference to {@link File} base source reference is null
     */
    protected String getParseSourceName() throws IllegalStateException {
	if (parseSourceFileName == null)
	/*
	 * this may be redundant at this point but I would like to leave this
	 * here for the time being.
	 */{
	    throw new IllegalStateException();
	}

	return parseSourceFileName;
    }

    protected void setParseSourceName(String parseSourceName) {
	this.parseSourceFileName = parseSourceName;
    }

}
